package com.jesonking.openfeignprovider;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalTime;

@SpringBootApplication
@RestController
public class OpenFeignProviderApplication {

	public static void main(String[] args) {
		SpringApplication.run(OpenFeignProviderApplication.class, args);
	}

	/**
	 * 为客户端提供可调用的接口
	 */
	@RequestMapping("/call/{name}")
	public String call(@PathVariable String name) {
		return LocalTime.now() + "——服务提供者：" + name;
	}
}
